package org.jeecg.modules.param.staffUser.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.param.staffUser.entity.RoleRes;


import java.util.List;


/**
 * @Description: bike_pile
 * @Author: 月月鸟
 * @Date:   2021-05-19
 * @Version: V1.0
 */
public interface StaffRoleMapper extends BaseMapper<RoleRes> {

    @Select("select id from sys_role where id in (select role_id from sys_user_role where user_id = (select id from sys_user where username=#{username}))")
    List<String> getStaffRoleByUserName(@Param("username") String username);

    @Select("select role_type from sys_role where id in (select role_id from sys_user_role where user_id = (select id from sys_user where username=#{username}))")
    List<String> getStaffRoleByType(@Param("username") String username);


}
